#ifndef __BSP_LED_H
#define __BSP_LED_H

#include "ch32f10x.h"
#include "variable.h"
	


//// LED频率1k,0~99脉宽设置
//#define TIMER2_PERIOD			99   
//#define TIMER2_PRESCALER	    719
//#define TIMER2_PULSE			10


// 通信端口定义
#define LED_RCC			  RCC_APB2Periph_GPIOB
#define LED_PORT  		  GPIOB
#define LED_PIN			  GPIO_Pin_2


// 端口操作定义
//#define LED_ON() 			TIM_SetCompare2(TIM2, 0);
//#define LED_OFF() 		TIM_SetCompare2(TIM2, TIMER2_PERIOD+1);
#define LED_ON()  		GPIO_SetBits(LED_PORT, LED_PIN)
#define LED_OFF()  		GPIO_ResetBits(LED_PORT, LED_PIN)
			
   



void LED_Init(void);
void LED_TOGGLE(void);
//void LED_Breathing(void);
//void LED_Updata(LED_STAT stat);
	
extern uint8_t led_stat;
#endif
